package cn.sofwin.os.web;

import cn.sofwin.core.mvc.support.annotation.BaseService;
import cn.sofwin.core.mvc.support.api.RequestResult;
import cn.sofwin.core.mvc.web.BaseController;
import cn.sofwin.os.entity.User;
import cn.sofwin.os.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 用户控制器
 * @author LetCode
 * @version 1.0
 * @date 2020-04-23 11:28:34
 *
 */
@RestController
@RequestMapping(value = "/os/user")
public class UserController extends BaseController<User> {

	@BaseService
	UserService userService;

	@PostMapping("login")
	public RequestResult login(@RequestBody User loginUser){
		return userService.login(loginUser);
	}

}